AMYBOARD_USB_HOST: one-off variant with USB MIDI host + UART REPL#1147
AMYBOARD_USB_HOST: one-off variant with USB MIDI host + UART REPL#1147bwhitman wants to merge 1 commit into
Conversation
New board variant for AMYboard that runs the USB port as a USB MIDI *host* (like Tulip CC) instead of the TinyUSB CDC + gadget-MIDI device. The REPL moves to UART0 — the same pins the stderr console already uses — so you control the board with a USB-serial dongle on the UART header while a MIDI keyboard/controller plugs into the USB port. - boards/AMYBOARD_USB_HOST: BOARD_DEFINITION1=AMYBOARD_USB_HOST, compiles ../esp32s3/usb_host.c, UART REPL on; otherwise identical config to AMYBOARD (same sdkconfig list and partition table). - esp32s3/usb_host.c/h: new USB_HOST_MIDI_ONLY guards (defined when AMYBOARD) compile out all HID keyboard/mouse/lvgl handling, leaving the MIDI host in/out paths. TULIP builds are unchanged. - amyboard/main.c: variant skips TinyUSB device init and starts the run_usb host task instead; defines tulip_ready (set in tulip_amyboard_start once AMY is up, gating host MIDI -> AMY). - amy_connector.c: variant drops AMY_MIDI_IS_USB_GADGET (the TinyUSB device stack is compiled for amy_midi.c's tud_* references but never initialized — all tud_* calls are verified no-ops in that state) and enables the Tulip send_usb_midi_out path for MIDI out to the attached USB device. Built and verified: AMYBOARD_USB_HOST, stock AMYBOARD, and TULIP4_R11 all compile clean. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
🔌 AMYboard PR previewEditor + flasher: https://amyboard-pr-1147.vercel.app/editor/ This preview bundles this PR's firmware — its flasher only flashes this build (not the release). Rebuilt on every push; removed when the PR closes. The hardware CI has been kicked off and should return within a few minutes, stand by! |
🌷 Tulip Web PR previewTulip Web: https://tulip-pr-1147.vercel.app/run/ Flash a Tulip to this build: on-device run Rebuilt on every push; removed when the PR closes. |
🎛️ HW CI (physical bench)AMYboard (USB-MIDI + AMY Tulip (TULIP4_R11; serial-REPL audio + WiFi screenshot): ✅ PASS — flashed this PR’s firmware; all checks matched the references. ⬇️ Artifacts: recordings · screenshot · serial logs · run logs Self-hosted bench. Audio spectral-compared to |
New board variant for AMYboard that runs the USB port as a USB MIDI host (like Tulip CC) instead of the TinyUSB CDC + gadget-MIDI device, for using AMYboard with a MIDI keyboard/controller plugged directly into its USB port.
The REPL moves to UART0 — the same pins the stderr console already uses — so you control the board with a USB-serial dongle on the UART header.
What's in here
tulip/amyboard/boards/AMYBOARD_USB_HOST/— new board dir. Identical config to AMYBOARD (same sdkconfig list, partition table, frozen manifest) exceptMICROPY_HW_ENABLE_UART_REPL=1,BOARD_DEFINITION1=AMYBOARD_USB_HOST, and it compiles../esp32s3/usb_host.c.tulip/esp32s3/usb_host.c/h— newUSB_HOST_MIDI_ONLYguards (defined whenAMYBOARDis) compile out the HID keyboard/mouse/lvgl handling, leaving the MIDI host in/out paths. TULIP builds are unchanged (guards are no-ops there).tulip/amyboard/main.c— variant skips TinyUSB device init and starts therun_usbhost task instead (core 1, same shape as Tulip); definestulip_ready, set intulip_amyboard_startonce AMY is up, which gates host MIDI → AMY.tulip/shared/amy_connector.c— variant dropsAMY_MIDI_IS_USB_GADGETand enables Tulip'ssend_usb_midi_outpath, sotulip_send_midi_outreaches the attached USB MIDI device. DIN MIDI (UART1, TRS A/B) is unchanged.Notes
tud_midi_*wheneverAMYBOARDis defined) but never initialized — verified that everytud_*call short-circuits safely in that state (tusb_inited()/TU_VERIFY(ep_in)/ empty fifos). This avoids any change to the amy submodule.tulip.board()still returns"AMYBOARD", so_boot.py/start_amy()/ sketch flow run unchanged.idf.py -DMICROPY_BOARD=AMYBOARD_USB_HOST buildintulip/amyboard, thenpython fs_create.py amyboardfromtulip/for the full image (dist/amyboard-full-AMYBOARD_USB_HOST.bin).Verified
AMYBOARD_USB_HOSTbuilds clean; full 16MB image assembles (fs_create picks up the board name automatically).AMYBOARDandTULIP4_R11still build clean with these changes.🤖 Generated with Claude Code